 #include <stdio.h>
 #include <linux/i2c-dev.h>	//bevat al de nodige functies
 //#include "i2c-dev.h"
#include "IR.h"
//http://www.mjmwired.net/kernel/Documentation/i2c/dev-interface
IR::IR () 
{

  	file=-1;
  	adapter_nr=2;  	/* adapter you want to access. You should 29	inspect /sys/class/i2c-dev/ or run "i2cdetect -l" to decide this */
    addr  = 0x40;   /* The I2C address */

    
    //__u8 register = 0x10; /* Device register to access */
	//__s32 res;
	char buf[10];
}
//open the device file
void IR::init()
{
	 //snprintf(filename, 19, "/dev/i2c-%d", adapter_nr);
     //file = open(filename, O_RDWR);
	 //if (file < 0) 
	 {
 	    /* ERROR HANDLING; you can check errno to see what went wrong */
 	    //exit(1);
 	  }
 	  
 	  //specify with what device address you want to communicate:
	//if (ioctl(file, I2C_SLAVE, addr) < 0) 
	{
	    /* ERROR HANDLING; you can check errno to see what went wrong */
		//exit(1);
	 }


}

/*
void IR::setTijd(long time)
{
	tijd=time;
}
void IR::setHoek(float hoekje)
{
	hoek=hoekje;	
}
int IR::getPositieX()
{
	return x;
}
int IR::getPositieY()
{
	return y;
}
long IR::getTijd()
{
	return tijd;
}
float IR::getHoek()
{
	return hoek;
}
void IR::gaNaar(int x,int y)
{
	DestinationX_=x;
	DestinationY_=y;
}
int IR::getDestinationX()
{
	return DestinationX_;
}

int IR::getDestinationY()
{
	return DestinationY_;
}
*/


